<template name="g-tabbar">
	<!-- 与包裹页面所有内容的元素u-page同级，且在它的下方 -->
	<view class="g-tabbar-footer">
		<u-tabbar id="u-tabbar-height" :list="tabbar.list" active-color="#19be6b"></u-tabbar>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		name: "g-tabbar",
		props: {},
		computed: {
			...mapGetters(['tabbar'])
		},
		methods: {
			getTabbarHeight(callback) {
				this.$nextTick(() => {
					const query = uni.createSelectorQuery().in(this);
					query.select('#u-tabbar-height').boundingClientRect(data => {
						callback(data.height)
					}).exec();
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.g-tabbar-footer {
		position: fixed;
		top: 0;
		z-index: 1000;
	}
</style>
